<template>
  <div class="hello">
    一起学习axios
  </div>
</template>

<script>
  export default {

    name: 'hello',

    created(){

      /*console.log(this)*/

        this.$http.get('http://easy-mock.com/mock/59cf334bc5c4302238f63f08/test-axios')

        .then((response)=>{

          console.log(response.data)
        })

        .catch((error) =>{

          console.log(error)

         })
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .hello {
    font-size: 30px;
  }
</style>
